package com.xiaoerkeji.eshop.bean;

import android.text.TextUtils;

import com.xiaoerkeji.eshop.request.BaseHttpRequest;

public class RequestInfo
{
    public int status;
    public String msg;
    public String time;
    public String data;
    public int what;
    public String mark;

    public boolean isOk() {
        return status == 0 && !TextUtils.isEmpty(time);
    }

    public String getErrorMsg() {
        if (status == BaseHttpRequest.Http_Error) {
            return "网络错误";
        }
        return TextUtils.isEmpty(msg) ? "数据解析失败" : msg;
    }
}
